
using Qdb.Internal;
using Qdb.Internal.Activation;

namespace Qdb.Internal.Activation
{
	public class DescendingActivationDepth : ActivationDepthImpl
	{
		private readonly IActivationDepthProvider _provider;

		public DescendingActivationDepth(IActivationDepthProvider provider, ActivationMode
			 mode) : base(mode)
		{
			_provider = provider;
		}

		public override IActivationDepth Descend(ClassMetadata metadata)
		{
			return _provider.ActivationDepthFor(metadata, _mode);
		}

		public override bool RequiresActivation()
		{
			return true;
		}
	}
}
